# File: pdp8progs/Makefile
# Makefile for building small testing pdp8 programs.
# Copyright (c) 2010 Radek Hnilica.

sources = $(shell ls *.pal)
rims	= $(subst .pal,.rim,$(sources))
lists   = $(subst .pal,.lst,$(sources))
bins    = $(subst .pal,.bin,$(sources))

.PHONY: all clean superclean
all: $(rims)
clean:
	-rm *~

superclean: clean
	-rm *.lst *.bin *.rim

# Generic rules
%.lst: %.pal
	pal $<
%.rim: %.pal
	pal -r $<
%.bin: %.pal
	pal $<
